import { Link, Route } from 'react-router-dom'
import './App.css';
import Home from './pages/Home';
import About from './pages/About';
import List from './pages/List'
import Detail from './pages/Detail'

function App() {
  return (
    <div className="App">
      <Link to="/home">首页---</Link>
      <Link to="/about">测试---</Link>
      <Link to="/list">列表---</Link>
      {/* 
      <Route path="/home" component={ Home }/>
      <Route path="/about" component={ About }/> */}


      {/* <Route path="/home" render={(routerProps) => {
        // console.log(routerProps)

        return <Home { ...routerProps }/>
      }} /> */}

      <Route path="/home" render={(routerProps) => {
        return <Home />
      }} />




      <Route path="/about" component={About} />

      <Route path="/list" component={List} />

      <Route path="/detail" component={Detail} />
    </div>
  );
}


export default App;
